package com.benz.order.util.multithread;

public class ThreadSleepTest {
    public static void main(String[] args) {
        new Thread(new ThreadSleep(),"Thread 1").start();
        for (int i = 0; i < 10; i++) {
            try {
                if(i==5){
                    Thread.sleep(2000);
                }else{
                    Thread.sleep(500);
                }
                System.out.println("Main Thread is outputting: " + i);
            } catch (InterruptedException e) {
                throw new RuntimeException(e);
            }
        }
    }
}
